package com.ioday01test;

import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.FileOutputStream;
import java.io.IOException;

public class FileCopyTest {
    public static void main(String[] args) throws IOException {
        FileInputStream fis = new FileInputStream("0110.dat");
        FileOutputStream fos = new FileOutputStream("1100.dat");
        int data;
        data = fis.read();
        fos.write(data);

        System.out.println("单字节复制成功");
        /*byte[] data  = new byte[3];
        int len;
          while ((len =fis.read(data))!= -1){
              fos.write(data,0,len);
          }*/
        System.out.println("块复制完成");
          fis.close();
          fos.close();
    }
}
